\hypertarget{namespace__setup__util}{\section{\-\_\-setup\-\_\-util Namespace Reference}
\label{namespace__setup__util}\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}}
}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{namespace__setup__util_a5b1728beb6e19ccf126bf9e02de6083e}{rollback\-\_\-env\-\_\-variables}
\item 
def \hyperlink{namespace__setup__util_a93f66029f749da0fa9796a4247778677}{\-\_\-rollback\-\_\-env\-\_\-variable}
\item 
def \hyperlink{namespace__setup__util_a4bc0c7ebbb559ce956160349b3077301}{\-\_\-get\-\_\-workspaces}
\item 
def \hyperlink{namespace__setup__util_a44654f701304ecab7e37798abf014d1a}{prepend\-\_\-env\-\_\-variables}
\item 
def \hyperlink{namespace__setup__util_a0d916ad34eea6871514c36f6e928d431}{\-\_\-prefix\-\_\-env\-\_\-variable}
\item 
def \hyperlink{namespace__setup__util_a7983d4ea2ecdeaf54e133950d8a76e77}{assignment}
\item 
def \hyperlink{namespace__setup__util_a9d73115db9efca5c20b575f96b9eb065}{comment}
\item 
def \hyperlink{namespace__setup__util_a4ced140c2841c9a3e692bf39d98aa9eb}{prepend}
\item 
def \hyperlink{namespace__setup__util_aad4a41589ebc32e81406c63db26e721a}{find\-\_\-env\-\_\-hooks}
\item 
def \hyperlink{namespace__setup__util_a68bdee5b1b36ce340607c5f122fc04ff}{\-\_\-parse\-\_\-arguments}
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
string \hyperlink{namespace__setup__util_a3fa0ca5a460a71a43cbc3d4954ab1f10}{C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E} = '.catkin'
\item 
tuple \hyperlink{namespace__setup__util_a5883fa688e2e824754a412ffc772863e}{system} = platform.\-system()
\item 
tuple \hyperlink{namespace__setup__util_aecbb100ce6f94bb3c7e16d58fde05f96}{I\-S\-\_\-\-D\-A\-R\-W\-I\-N} = (\hyperlink{namespace__setup__util_a5883fa688e2e824754a412ffc772863e}{system} == 'Darwin')
\item 
tuple \hyperlink{namespace__setup__util_a6fe69c2dbd92959b6651a28cbb846e6e}{I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S} = (\hyperlink{namespace__setup__util_a5883fa688e2e824754a412ffc772863e}{system} == 'Windows')
\item 
dictionary \hyperlink{namespace__setup__util_aa31804f1be8660156ce9394b33c68dc4}{E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S}
\item 
tuple \hyperlink{namespace__setup__util_ac67cb2d93e0636936bcbeb363e2c87c3}{args} = \hyperlink{namespace__setup__util_a68bdee5b1b36ce340607c5f122fc04ff}{\-\_\-parse\-\_\-arguments}()
\item 
string \hyperlink{namespace__setup__util_a44bed5f85daa4641b3c144edb9e8c1c1}{C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H} = '/opt/ros/jade'
\item 
tuple \hyperlink{namespace__setup__util_aecc545d18611814ee5d7ccdf6aa55f90}{base\-\_\-path} = os.\-path.\-dirname(\-\_\-\-\_\-file\-\_\-\-\_\-)
\item 
tuple \hyperlink{namespace__setup__util_a0a3189a3fa13a696964c791ed2a5ea85}{environ} = dict(os.\-environ)
\item 
list \hyperlink{namespace__setup__util_a8618d8be5f729d4c9696daa5e083a001}{lines} = \mbox{[}$\,$\mbox{]}
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{namespace__setup__util_a4bc0c7ebbb559ce956160349b3077301}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!\-\_\-get\-\_\-workspaces@{\-\_\-get\-\_\-workspaces}}
\index{\-\_\-get\-\_\-workspaces@{\-\_\-get\-\_\-workspaces}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{\-\_\-get\-\_\-workspaces}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-\_\-get\-\_\-workspaces (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{include\-\_\-fuerte = {\ttfamily False}, }
\item[{}]{include\-\_\-non\-\_\-existing = {\ttfamily False}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{namespace__setup__util_a4bc0c7ebbb559ce956160349b3077301}
\begin{DoxyVerb}Based on CMAKE_PREFIX_PATH return all catkin workspaces.

:param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool``
\end{DoxyVerb}
 \hypertarget{namespace__setup__util_a68bdee5b1b36ce340607c5f122fc04ff}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!\-\_\-parse\-\_\-arguments@{\-\_\-parse\-\_\-arguments}}
\index{\-\_\-parse\-\_\-arguments@{\-\_\-parse\-\_\-arguments}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{\-\_\-parse\-\_\-arguments}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-\_\-parse\-\_\-arguments (
\begin{DoxyParamCaption}
\item[{}]{args = {\ttfamily None}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{namespace__setup__util_a68bdee5b1b36ce340607c5f122fc04ff}
\hypertarget{namespace__setup__util_a0d916ad34eea6871514c36f6e928d431}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!\-\_\-prefix\-\_\-env\-\_\-variable@{\-\_\-prefix\-\_\-env\-\_\-variable}}
\index{\-\_\-prefix\-\_\-env\-\_\-variable@{\-\_\-prefix\-\_\-env\-\_\-variable}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{\-\_\-prefix\-\_\-env\-\_\-variable}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-\_\-prefix\-\_\-env\-\_\-variable (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{name, }
\item[{}]{paths, }
\item[{}]{subfolders}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{namespace__setup__util_a0d916ad34eea6871514c36f6e928d431}
\begin{DoxyVerb}Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
\end{DoxyVerb}
 \hypertarget{namespace__setup__util_a93f66029f749da0fa9796a4247778677}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!\-\_\-rollback\-\_\-env\-\_\-variable@{\-\_\-rollback\-\_\-env\-\_\-variable}}
\index{\-\_\-rollback\-\_\-env\-\_\-variable@{\-\_\-rollback\-\_\-env\-\_\-variable}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{\-\_\-rollback\-\_\-env\-\_\-variable}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-\_\-rollback\-\_\-env\-\_\-variable (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{name, }
\item[{}]{subfolder}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{namespace__setup__util_a93f66029f749da0fa9796a4247778677}
\begin{DoxyVerb}For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder.

:param subfolder: str '' or subfoldername that may start with '/'
:returns: the updated value of the environment variable.
\end{DoxyVerb}
 \hypertarget{namespace__setup__util_a7983d4ea2ecdeaf54e133950d8a76e77}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!assignment@{assignment}}
\index{assignment@{assignment}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{assignment}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-assignment (
\begin{DoxyParamCaption}
\item[{}]{key, }
\item[{}]{value}
\end{DoxyParamCaption}
)}}\label{namespace__setup__util_a7983d4ea2ecdeaf54e133950d8a76e77}
\hypertarget{namespace__setup__util_a9d73115db9efca5c20b575f96b9eb065}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!comment@{comment}}
\index{comment@{comment}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{comment}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-comment (
\begin{DoxyParamCaption}
\item[{}]{msg}
\end{DoxyParamCaption}
)}}\label{namespace__setup__util_a9d73115db9efca5c20b575f96b9eb065}
\hypertarget{namespace__setup__util_aad4a41589ebc32e81406c63db26e721a}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!find\-\_\-env\-\_\-hooks@{find\-\_\-env\-\_\-hooks}}
\index{find\-\_\-env\-\_\-hooks@{find\-\_\-env\-\_\-hooks}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{find\-\_\-env\-\_\-hooks}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-find\-\_\-env\-\_\-hooks (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{cmake\-\_\-prefix\-\_\-path}
\end{DoxyParamCaption}
)}}\label{namespace__setup__util_aad4a41589ebc32e81406c63db26e721a}
\begin{DoxyVerb}Generate shell code with found environment hooks
for the all workspaces.
\end{DoxyVerb}
 \hypertarget{namespace__setup__util_a4ced140c2841c9a3e692bf39d98aa9eb}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!prepend@{prepend}}
\index{prepend@{prepend}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{prepend}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-prepend (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{key, }
\item[{}]{prefix}
\end{DoxyParamCaption}
)}}\label{namespace__setup__util_a4ced140c2841c9a3e692bf39d98aa9eb}
\hypertarget{namespace__setup__util_a44654f701304ecab7e37798abf014d1a}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!prepend\-\_\-env\-\_\-variables@{prepend\-\_\-env\-\_\-variables}}
\index{prepend\-\_\-env\-\_\-variables@{prepend\-\_\-env\-\_\-variables}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{prepend\-\_\-env\-\_\-variables}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-prepend\-\_\-env\-\_\-variables (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{env\-\_\-var\-\_\-subfolders, }
\item[{}]{workspaces}
\end{DoxyParamCaption}
)}}\label{namespace__setup__util_a44654f701304ecab7e37798abf014d1a}
\begin{DoxyVerb}Generate shell code to prepend environment variables
for the all workspaces.
\end{DoxyVerb}
 \hypertarget{namespace__setup__util_a5b1728beb6e19ccf126bf9e02de6083e}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!rollback\-\_\-env\-\_\-variables@{rollback\-\_\-env\-\_\-variables}}
\index{rollback\-\_\-env\-\_\-variables@{rollback\-\_\-env\-\_\-variables}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{rollback\-\_\-env\-\_\-variables}]{\setlength{\rightskip}{0pt plus 5cm}def \-\_\-setup\-\_\-util.\-rollback\-\_\-env\-\_\-variables (
\begin{DoxyParamCaption}
\item[{}]{environ, }
\item[{}]{env\-\_\-var\-\_\-subfolders}
\end{DoxyParamCaption}
)}}\label{namespace__setup__util_a5b1728beb6e19ccf126bf9e02de6083e}
\begin{DoxyVerb}Generate shell code to reset environment variables
by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH.
This does not cover modifications performed by environment hooks.
\end{DoxyVerb}
 

\subsection{Variable Documentation}
\hypertarget{namespace__setup__util_ac67cb2d93e0636936bcbeb363e2c87c3}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!args@{args}}
\index{args@{args}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{args}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-args = {\bf \-\_\-parse\-\_\-arguments}()}}\label{namespace__setup__util_ac67cb2d93e0636936bcbeb363e2c87c3}
\hypertarget{namespace__setup__util_aecc545d18611814ee5d7ccdf6aa55f90}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!base\-\_\-path@{base\-\_\-path}}
\index{base\-\_\-path@{base\-\_\-path}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{base\-\_\-path}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-base\-\_\-path = os.\-path.\-dirname(\-\_\-\-\_\-file\-\_\-\-\_\-)}}\label{namespace__setup__util_aecc545d18611814ee5d7ccdf6aa55f90}
\hypertarget{namespace__setup__util_a3fa0ca5a460a71a43cbc3d4954ab1f10}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E@{C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E}}
\index{C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E@{C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E}]{\setlength{\rightskip}{0pt plus 5cm}string \-\_\-setup\-\_\-util.\-C\-A\-T\-K\-I\-N\-\_\-\-M\-A\-R\-K\-E\-R\-\_\-\-F\-I\-L\-E = '.catkin'}}\label{namespace__setup__util_a3fa0ca5a460a71a43cbc3d4954ab1f10}
\hypertarget{namespace__setup__util_a44bed5f85daa4641b3c144edb9e8c1c1}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H@{C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H}}
\index{C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H@{C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-C\-M\-A\-K\-E\-\_\-\-P\-R\-E\-F\-I\-X\-\_\-\-P\-A\-T\-H = '/opt/ros/jade'}}\label{namespace__setup__util_a44bed5f85daa4641b3c144edb9e8c1c1}
\hypertarget{namespace__setup__util_aa31804f1be8660156ce9394b33c68dc4}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S@{E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S}}
\index{E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S@{E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S}]{\setlength{\rightskip}{0pt plus 5cm}dictionary \-\_\-setup\-\_\-util.\-E\-N\-V\-\_\-\-V\-A\-R\-\_\-\-S\-U\-B\-F\-O\-L\-D\-E\-R\-S}}\label{namespace__setup__util_aa31804f1be8660156ce9394b33c68dc4}
{\bfseries Initial value\-:}
\begin{DoxyCode}
1 = \{
2     \textcolor{stringliteral}{'CMAKE\_PREFIX\_PATH'}: \textcolor{stringliteral}{''},
3     \textcolor{stringliteral}{'CPATH'}: \textcolor{stringliteral}{'include'},
4     \textcolor{stringliteral}{'LD\_LIBRARY\_PATH'} \textcolor{keywordflow}{if} \textcolor{keywordflow}{not} IS\_DARWIN \textcolor{keywordflow}{else} \textcolor{stringliteral}{'DYLD\_LIBRARY\_PATH'}: [\textcolor{stringliteral}{'lib'}, os.path.join(\textcolor{stringliteral}{'lib'}, \textcolor{stringliteral}{'
      x86\_64-linux-gnu'})],
5     \textcolor{stringliteral}{'PATH'}: \textcolor{stringliteral}{'bin'},
6     \textcolor{stringliteral}{'PKG\_CONFIG\_PATH'}: [os.path.join(\textcolor{stringliteral}{'lib'}, \textcolor{stringliteral}{'pkgconfig'}), os.path.join(\textcolor{stringliteral}{'lib'}, \textcolor{stringliteral}{'x86\_64-linux-gnu'}, \textcolor{stringliteral}{'
      pkgconfig'})],
7     \textcolor{stringliteral}{'PYTHONPATH'}: \textcolor{stringliteral}{'lib/python2.7/dist-packages'},
8 \}
\end{DoxyCode}
\hypertarget{namespace__setup__util_a0a3189a3fa13a696964c791ed2a5ea85}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!environ@{environ}}
\index{environ@{environ}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{environ}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-environ = dict(os.\-environ)}}\label{namespace__setup__util_a0a3189a3fa13a696964c791ed2a5ea85}
\hypertarget{namespace__setup__util_aecbb100ce6f94bb3c7e16d58fde05f96}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!I\-S\-\_\-\-D\-A\-R\-W\-I\-N@{I\-S\-\_\-\-D\-A\-R\-W\-I\-N}}
\index{I\-S\-\_\-\-D\-A\-R\-W\-I\-N@{I\-S\-\_\-\-D\-A\-R\-W\-I\-N}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{I\-S\-\_\-\-D\-A\-R\-W\-I\-N}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-I\-S\-\_\-\-D\-A\-R\-W\-I\-N = ({\bf system} == 'Darwin')}}\label{namespace__setup__util_aecbb100ce6f94bb3c7e16d58fde05f96}
\hypertarget{namespace__setup__util_a6fe69c2dbd92959b6651a28cbb846e6e}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S@{I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S}}
\index{I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S@{I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-I\-S\-\_\-\-W\-I\-N\-D\-O\-W\-S = ({\bf system} == 'Windows')}}\label{namespace__setup__util_a6fe69c2dbd92959b6651a28cbb846e6e}
\hypertarget{namespace__setup__util_a8618d8be5f729d4c9696daa5e083a001}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!lines@{lines}}
\index{lines@{lines}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{lines}]{\setlength{\rightskip}{0pt plus 5cm}list \-\_\-setup\-\_\-util.\-lines = \mbox{[}$\,$\mbox{]}}}\label{namespace__setup__util_a8618d8be5f729d4c9696daa5e083a001}
\hypertarget{namespace__setup__util_a5883fa688e2e824754a412ffc772863e}{\index{\-\_\-setup\-\_\-util@{\-\_\-setup\-\_\-util}!system@{system}}
\index{system@{system}!_setup_util@{\-\_\-setup\-\_\-util}}
\subsubsection[{system}]{\setlength{\rightskip}{0pt plus 5cm}tuple \-\_\-setup\-\_\-util.\-system = platform.\-system()}}\label{namespace__setup__util_a5883fa688e2e824754a412ffc772863e}
